
package net.mcreator.ender_logistics.item;

import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.item.UseAnim;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Item;
import net.minecraft.world.InteractionResult;

import net.mcreator.ender_logistics.procedures.BindingProcedure;
import net.mcreator.ender_logistics.init.EnderLogisticsModTabs;

public class BindingModuleItem extends Item {
	public BindingModuleItem() {
		super(new Item.Properties().tab(EnderLogisticsModTabs.TAB_ENDER_LOGISTICS).stacksTo(1).fireResistant().rarity(Rarity.COMMON));
	}

	@Override
	public UseAnim getUseAnimation(ItemStack itemstack) {
		return UseAnim.EAT;
	}

	@Override
	public InteractionResult useOn(UseOnContext context) {
		super.useOn(context);
		BindingProcedure.execute(context.getLevel(), context.getClickedPos().getX(), context.getClickedPos().getY(), context.getClickedPos().getZ(),
				context.getPlayer(), context.getItemInHand());
		return InteractionResult.SUCCESS;
	}
}
